package com.bootdo.program.wallpaper.service;

import com.bootdo.program.wallpaper.dao.DistributionProfitDao;
import com.bootdo.program.wallpaper.domain.DistributionProfitDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;




@Service
public class DistributionProfitService {
	@Autowired
	private DistributionProfitDao distributionProfitDao;
	

	public DistributionProfitDO get(Long id){
		return distributionProfitDao.get(id);
	}
	

	public List<DistributionProfitDO> list(Map<String, Object> map){
		return distributionProfitDao.list(map);
	}
	

	public int count(Map<String, Object> map){
		return distributionProfitDao.count(map);
	}
	

	public int save(DistributionProfitDO distributionProfit){
		return distributionProfitDao.save(distributionProfit);
	}
	

	public int update(DistributionProfitDO distributionProfit){
		return distributionProfitDao.update(distributionProfit);
	}
	

	public int remove(Long id){
		return distributionProfitDao.remove(id);
	}
	

	public int batchRemove(Long[] ids){
		return distributionProfitDao.batchRemove(ids);
	}

	public int updateStatus(int status,String startTime,String userId,Integer settlemantPlatform) throws Exception{
		Map<String,Object> map = new HashMap<>();
		map.put("status",status);
		map.put("startTime",startTime);
		map.put("userId",userId);
		map.put("settlemantPlatform",settlemantPlatform);
		return distributionProfitDao.updateStatus(map);
	}
	
}
